var commitHbs = `
* {{header}}

{{~!-- commit link --}} {{#if @root.linkReferences~}}
  ([{{hash}}](
  {{~#if @root.repository}}
    {{~#if @root.host}}
      {{~@root.host}}/
    {{~/if}}
    {{~#if @root.owner}}
      {{~@root.owner}}/
    {{~/if}}
    {{~@root.repository}}
  {{~else}}
    {{~@root.repoUrl}}
  {{~/if}}/
  {{~@root.commit}}/{{hash}}))
{{~else}}
  {{~hash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
  , closes
  {{~#each references}} {{#if @root.linkReferences~}}
    {{~#if this.owner}}
      {{~this.owner}}/
    {{~/if}}
    {{~this.repository}}#{{this.issue}}
  {{~else}}
    {{~#if this.owner}}
      {{~this.owner}}/
    {{~/if}}
    {{~this.repository}}#{{this.issue}}
  {{~/if}}{{/each}}
{{~/if}}
`;
module.exports = {
    plugins: [
        "@semantic-release/commit-analyzer",
        ["@semantic-release/release-notes-generator", {
            "preset": "angular",
            "writerOpts": {
                "commitPartial": commitHbs
              }
        }],
        "@semantic-release/changelog",
        ["@semantic-release/git", {
            "assets": ["CHANGELOG.md"],
            "message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
        }],
        ["@semantic-release/exec", {
            "publishCmd" : "publish '${nextRelease.version}' '${nextRelease.notes}'"
        }]
      ],
  };
  